<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0, user-scalable=no">
  </head>
  <body>
      <script>
        //求数字的平方
        //   Math.pow(4,2)
        //   Math.pow(3,2)
        
        function makePower(power){
            return function(number) {
                return Math.pow(number, power)
                }
        }

        // 求平方
        let power2 = makePower(2)
        let power3 = makePower(3)

        console.log(power2(4))
        console.log(power2(5)
        
      </script>
  </body>
</html>
